<?php
require_once($_SERVER['DOCUMENT_ROOT']."/defaultconf.mex");
require_once($GLOBALS['PAD']."Modules/Contabilidade/modconf.mex");
MYTCONN();

	$MD1 = '" disabled readonly="';

	if(isset($_GET['DPID'])) {
	$GET = $GLOBALS['MYT']->db_array("SELECT 
			Dp_ID,
			Dp_Oficina,
			Dp_Entidad,
			Dp_FIngreso,
			DATE(Dp_FValor) AS Dp_FValor,
			Dp_Valor,
			Dp_Currency,
			Dp_Saldo,
			Dp_Concepto,
			Dp_Cliente,
			Dp_Factura,
			Dp_FactMs,
			Dp_CashierGroup,
			Dp_CASE,
			Dp_Status
		FROM depositos WHERE Dp_ID = {$_GET['DPID']}");


	} else {

	}
	if($GET[1]['Dp_Status'] == 2){$MD1 = '';}

form_pr('DpEdit','','','post');

	mn_field('text','ED','Dp_ID',$GET[1]['Dp_ID'],'10','10','','" style="position:absolute;top:10px;left:100px" readonly="');
	mn_field('text','ED','Dp_Oficina',$GET[1]['Dp_Oficina'],'','','','" disabled style="position:absolute;top:30px;left:100px"');
	mn_field('text','ED','Dp_Entidad',$GET[1]['Dp_Entidad'],'','','','" disabled style="position:absolute;top:30px;left:340px"');
	mn_field('text','ED','Dp_FIngreso',$GET[1]['Dp_FIngreso'],'16','16','','" disabled style="position:absolute;top:50px;left:100px"');
	echo '<div style="position:absolute;top:50px;left:340px">';
	mn_field('date','ED','Dp_FValor',$GET[1]['Dp_FValor'],'DpEdit','7','','');
	echo '</div>';
	mn_field('text','ED','Dp_Valor',$GET[1]['Dp_Valor'],'19','19','','" disabled style="position:absolute;top:70px;left:100px"');
	mn_field('select','ED','Dp_Currency',$GET[1]['Dp_Currency'],"SELECT miso_Cod_elite AS ID, miso_ID AS NAME FROM hd_monedasiso WHERE miso_Cod_elite > 0",'','','" disabled style="position:absolute;top:70px;left:340px"');
	mn_field('text','ED','Dp_Saldo',$GET[1]['Dp_Saldo'],'19','19','','" disabled style="position:absolute;top:90px;left:100px"');
	mn_field('text','ED','Dp_Concepto',$GET[1]['Dp_Concepto'],'','','','" disabled style="position:absolute;top:110px;left:100px"');
	mn_field('text','ED','Dp_Cliente',$GET[1]['Dp_Cliente'],'10','10','','" disabled style="position:absolute;top:130px;left:100px"');
	mn_field('text','ED','Dp_Factura',$GET[1]['Dp_Factura'],'10','10','','" disabled style="position:absolute;top:150px;left:100px"');
	mn_field('text','ED','Dp_FactMs',$GET[1]['Dp_FactMs'],'10','10','','" disabled style="position:absolute;top:150px;left:300px"');
	mn_field('text','ED','Dp_CashierGroup',$GET[1]['Dp_CashierGroup'],'10','10','','" disabled style="position:absolute;top:170px;left:100px"');
	mn_field('text','ED','Dp_CASE',$GET[1]['Dp_CASE'],'10','10','','" disabled style="position:absolute;top:170px;left:300px"');
	mn_field('hselect','ED','Dp_Status',$GET[1]['Dp_Status'],"Aberto;Cancelado;Fechado#2;5;6",'','',$MD1.'" style="position:absolute;top:190px;left:100px" onchange="
			if(this.options[this.selectedIndex].value==6){
				document.DpEdit.Dp_Submit.disabled=true;
			} else {
				document.DpEdit.Dp_Submit.disabled=false;
			}');
	
	mn_field('button','ED','Dp_Submit','Salvar','','','',$MD1.'" style="position:absolute;top:220px;left:100px" onclick="
		document.DpEdit.action=\'_response/rsproxy.php?pr=csh_depositedit\';
		subform(\'DpEdit\',\'rsDeposit\');');
?>

	<label style="position:absolute;top:10px;left:10px">Numero</label>
	<label style="position:absolute;top:30px;left:10px">Dominio</label>
	<label style="position:absolute;top:30px;left:240px">Origem</label>
	<label style="position:absolute;top:50px;left:10px">Data Movimento</label>
	<label style="position:absolute;top:50px;left:240px">Data do Valor</label>
	<label style="position:absolute;top:70px;left:10px">Valor</label>
	<label style="position:absolute;top:70px;left:240px">Moeda:</label>
	<label style="position:absolute;top:90px;left:10px">Saldo na Data</label>
	<label style="position:absolute;top:110px;left:10px">Conceito/Tipo:</label>
	<label style="position:absolute;top:130px;left:10px">Cliente</label>
	<label style="position:absolute;top:150px;left:10px">Remessa</label>
	<label style="position:absolute;top:150px;left:200px">Remessa Recibo</label>
	<label style="position:absolute;top:170px;left:10px">Tipo de Caixa</label>
	<label style="position:absolute;top:170px;left:200px">Numero de Caixa</label>
	<label style="position:absolute;top:190px;left:10px">Situacao</label>

<div id="rsDeposit" style="position:absolute;top:220px;left:200px"></div>
</form>
